package com.chnbst.bstyun.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.chnbst.bstyun.core.base.BaseService;
import com.chnbst.bstyun.core.common.helper.DaoHelper;
import com.chnbst.bstyun.model.pojo.MessageCheck;
import com.chnbst.bstyun.service.MessageCheckService;

@Transactional
@Service
public class MessageCheckServiceImpl extends BaseService implements MessageCheckService{

	//声明日志对象 logback
		private final static Logger logger = LoggerFactory.getLogger(MessageCheckServiceImpl.class);
		private final static String nameSpace = "com.chnbst.bstyun.mapper.MessageCheckMapper";
	@Override
	public MessageCheck selectByToTel(MessageCheck messageCheck) {
		return (MessageCheck)DaoHelper.query(nameSpace, "selectByPrimaryKey", messageCheck);
	}

	@Transactional(propagation=Propagation.REQUIRED,readOnly=false)
	@Override
	public boolean updateByToTel(MessageCheck messageCheck) {
		return DaoHelper.update(nameSpace, "updateByToTel", messageCheck);
	}
	
	@Transactional(propagation=Propagation.REQUIRED,readOnly=false)
	@Override
	public boolean insertMessageInfo(MessageCheck messageCheck) {
		return DaoHelper.insert(nameSpace, "insert", messageCheck);
	}

}
